//
// File:	IAnimation.hpp
// Author:	Thomas TISSOT-DUPONT
// E-mail:	<thomas.tissotdupont@free.fr>
// Create:	01/02/2010 21:17:02
// Purpose:	
//
#ifndef IANIMATION_HPP
#define IANIMATION_HPP

#include <string>
#include "Event.hpp"

class IAnimation
{
public events:
	Event<void (IAnimation *)>		OnAnimationFinished;
	Event<void (IAnimation *)>		OnAnimationLooped;

public:
	struct Frame
	{
		int							top;
		int							left;
		int							right;
		int							bottom;
	};

public:
	virtual							~IAnimation() {}

public:
	virtual void					Play() = 0;
	virtual void					Pause() = 0;
	virtual void					Stop() = 0;
	virtual void					Update() = 0;

public:
	virtual const std::string		&GetName() const = 0;
	virtual void					SetFrameRate(float) = 0;
	virtual void					SetLoop(bool) = 0;
	virtual void					SetFlipped(bool) = 0;
	virtual bool					IsPlaying() const = 0;
	virtual const Frame				*GetCurrentFrame() const = 0;

};

#endif //!IANIMATION_HPP
